package com.rfid.controller;


import com.rfid.common.Result;
import com.rfid.entity.Book;
import com.rfid.entity.BookForm;
import com.rfid.entity.ExceptBook;
import com.rfid.mapper.ExceptBookMapper;
import com.rfid.service.RfidService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.List;

/**
 * Editor: hengBao
 * Wechat：zh17530588817
 * date: 2022/12/11/16:21
 * title：
 */

@RestController
@RequestMapping("/book")
public class BookController {
    @Autowired
    private RfidService service;
    @PostMapping("/judgeBooks")
    public Result<?> judgeBooks(@RequestBody String bookForm) {
        return Result.success(service.judgeBooks(bookForm));
    }


    @GetMapping("/getExceptBooks")
    public Result<?> getExceptBooks() {
        return Result.success(service.getExceptBooks());
    }

    @PostMapping("/addExceptBook")
    public Result<?> addExceptBook(@RequestBody String bookForm) {
        service.addExceptBook(bookForm);
        return Result.success("添加成功");
    }
}
